@mixin overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 0;
  .delete-bar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: rgba($color: #f00, $alpha: 0.7);
    display: flex;
    // flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease-in-out;
    color: #fff;
    opacity: 0;
    cursor: pointer;
    font-size: 14px;
    writing-mode: vertical-rl;

    &:hover {
      font-size: 16px;
      font-weight: bold;
    }
  }

  &:hover {
    /* 添加浅色虚线边框 */
    .delete-bar {
      width: 24px;
      opacity: 1;
      z-index: 99;
      pointer-events: all;
    }
  }
  .com-name-overlay {
    position: absolute;
    top: 0;
    left: 0;
    // left: 50%;
    // transform: translateX(-50%);
    display: none;
    .name {
      // background-color: rgba($color: #000, $alpha: 0.5);
      color: #fff;
      padding: 2px 5px;
    }
    .close-icon{
      // background-color: rgba($color: #000, $alpha: 0.5);
      color: #fff;
      padding: 2px;
    }
  }
  &.active {
    .com-name-overlay {
      gap:1px;
      display: inline-flex;
      align-items: center;
    }
  }
  .el-icon-close:not(.button) {
    position: absolute;
    top: 0;
    left: 75px;
    padding: 2px 5px;
    background-color: rgba($color: #ff0000, $alpha: 0.7); /* 添加浅色虚线边框 */
    color: #fff;
    transform: translateY(-100%);
    z-index: 10;
    cursor: pointer;
    display: none;
    height: 28px;
    width: 28px;
    
  }
  &.active {
    .el-icon-close {
      display: flex;
      align-items: center;
      justify-content: center
    }
  }
  // &:hover {
  //   .el-icon-close {
  //     opacity: 1;
  //   }
  // }
}
